<?php

namespace app\index\traits;

use app\common\model\Member;
use think\exception\ValidateException;

/**
 * 账户冻结
 * Trait StatusTrait
 * @package app\member\traits
 */
trait StatusTrait
{
    /**
     * 检查是否被冻结
     * @param \app\common\model\Member $member
     * @return void
     */
    private function checkMemberStatus(Member $member): void
    {
        if ($member->muted == 0) {
            throw new ValidateException('由于您的违规操作，您的账号已被冻结');
        }
    }
}